const num = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]

// 遍历数组求和
let sum = 0
for(let i = 0; i < num.length; i++) {
  sum += num[i]
}
console.log(sum)
